<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class AddSettingsToUsersTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('users', function (Blueprint $table) {
            $table->enum('sex_limited', [1, 2, 3])->default(3);
            $table->integer('delay_time')->default(10);
            $table->integer('maxed_wechat_request_num')->default(20);
            $table->integer('maxed_qq_request_num')->default(20);
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('users', function (Blueprint $table) {
          $table->dropColumn('sex_limited');
          $table->dropColumn('delay_time');
          $table->dropColumn('maxed_wechat_request_num');
          $table->dropColumn('maxed_qq_request_num');
        });
    }
}
